Get enum value from string or int

39

Get enum value from string or int -

MyEnum myEnum = (MyEnum)myInt;

MyEnum myEnum = (MyEnum)Enum.Parse(typeof(MyEnum), myString);

Comments

Submit
0 Comments